package main.cn.service.impl;

import main.cn.dao.PetDao;
import main.cn.dao.impl.PetDaoImpl;
import main.cn.pojo.Pet;
import main.cn.service.PetService;

import java.util.List;


public class PetServiceImpl implements PetService {

    private PetDao petDao = new PetDaoImpl();

    @Override
    public void addPet(Pet _pet) {
        petDao.addPet(_pet);
    }

    @Override
    public void deletePetById(int id) {
        petDao.deletePet(id);
    }

    @Override
    public void updatePet(Pet _pet) {
        petDao.updatePet(_pet);
    }

    @Override
    public Pet queryPetById(int pid) {
        return petDao.queryPetById(pid);
    }

    @Override
    public List<Pet> queryPets() {
        return petDao.queryPets();
    }
}
